package RLK_HIBERNATE;


import lombok.SneakyThrows;
import org.hibernate.Session;
import org.hibernate.engine.spi.SessionFactoryImplementor;

public class Example_01 {
    private SessionFactoryImplementor factory;

    @SneakyThrows
    public void makePersistent(final Object[] keys) {
        Session session = factory.openSession();
        session.beginTransaction();

        for (final Object key : keys) {
            session.persist(key);
        }
        session.close();
    }
}
